
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--取出后端传递过来的变量值-->
<h1 th:text="${msg}">hello,thyemleaf</h1>
<p th:text="${session.sess}">

    <!--取出person对象的值-->
    <div th:object="${person}">
<p th:text="*{uname}"></p>
<p th:text="*{sex}"></p>
<p th:text="*{hiredate}"></p>
<p th:text="*{age}"></p>
</div>
<table>
    <!--取出list集合中的数据-->
    <tr th:each="person:${list}">
        <td th:text="${person.uname}"></td>
        <td th:text="${person.sex}"></td>
        <td th:text="${person.hiredate}"></td>
        <td th:text="${person.age}"></td>
    </tr>
</table>
</p>
</body>
</html>